package com.gmall.product.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gmall.common.result.Result;
import com.gmall.common.utils.PageInfoVo;
import com.gmall.common.utils.R;
import com.gmall.model.base.User;
import com.gmall.product.mapper.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @author: zyh
 * @create: 2024-09-12 21:35
 **/
@Service
public class TestServiceImpl extends ServiceImpl<TestMapper,User> implements TestService {
     @Autowired
     TestMapper testMapper;


    @Override
    public R selectPage(PageInfoVo pageInfoVo) {
        IPage<User> page = new Page<>(pageInfoVo.getPageNum(),pageInfoVo.getPageSize());

        IPage<User> userIPage = testMapper.selectUser(page,pageInfoVo);
        return R.OK(userIPage);
    }
}
